home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmcheck_4
- BackColor = &H00FFFF80&
- Caption = "Check Four"
- ClientHeight = 5355
- ClientLeft = 705
- ClientTop = 1500
- ClientWidth = 6750
- Height = 5760
- Left = 645
- LinkTopic = "Form1"
- ScaleHeight = 5355
- ScaleWidth = 6750
- Top = 1155
- Width = 6870
- Begin Timer Timer1
- Enabled = 0 'False
- Interval = 200
- Left = 45
- Top = 4815
- End
- Begin CommandButton Command1
- Caption = "Command1"
- Height = 825
- Left = 450
- TabIndex = 1
- Top = 90
- Width = 1140
- End
- Begin PictureBox picFrame
- BackColor = &H0080FF80&
- Height = 4335
- Left = 540
- ScaleHeight = 4305
- ScaleWidth = 4305
- TabIndex = 0
- Top = 855
- Width = 4335
- Begin Image imgblue
- Height = 480
- Left = 1620
- Picture = CHECK_4.FRX:0000
- Top = 1980
- Width = 480
- End
- Begin Image ImgRed
- Height = 480
- Left = 405
- Picture = CHECK_4.FRX:0302
- Top = 2835
- Width = 480
- End
- Begin Line LineX
- Index = 0
- X1 = 0
- X2 = 4320
- Y1 = 1215
- Y2 = 1215
- End
- Begin Line LineY
- Index = 0
- X1 = 1260
- X2 = 1260
- Y1 = 315
- Y2 = 4590
- End
- End
- Option Explicit
- Sub Command1_Click ()
- curcol = 4
- currow = 3
- timer1.Enabled = True
- End Sub
- Function FindRow (mycol As Integer) As Integer
- Dim rc As Integer
- For rc = 1 To squareh
- If Not Abs(squares(mycol, rc)) = 1 Then
- Exit For
- End If
- FindRow = rc
- End Function
- Sub Form_Load ()
- picframe.Width = imgred.Width * squarew + (squarew * 2)
- picframe.Height = imgred.Height * squareh + (squareh * 2)
- picframe.Left = deltawidth
- picframe.Top = frmcheck_4.ScaleHeight - picframe.Height - deltaheight
- downrc = squareh
- currow = 1
- picframe.ScaleMode = 0
- picframe.ScaleHeight = -8
- picframe.ScaleWidth = 8
- picframe.ScaleLeft = 1
- picframe.ScaleTop = 8
- Dim rc As Integer
- If squarew > 2 Then
- For rc = 1 To squarew - 2
- Load liney(rc)
- liney(rc).Visible = True
- Next rc
- End If
- If squareh > 2 Then
- For rc = 1 To squareh - 2
- Load linex(rc)
- linex(rc).Visible = True
- Next rc
- End If
- For rc = 0 To squarew - 2
- liney(rc).X1 = rc + 2
- liney(rc).X2 = rc + 2
- liney(rc).Y1 = 0
- liney(rc).Y2 = squarew
- Next rc
- For rc = 0 To squareh - 2
- linex(rc).Y1 = rc + 1
- linex(rc).Y2 = rc + 1
- linex(rc).X1 = 1
- linex(rc).X2 = squareh + 1
- Next rc
- color = red
- End Sub
- Sub inputdata (datax As Integer, datay As Integer)
- squares(datax, datay) = color
- End Sub
- Sub picFrame_MouseUp (Button As Integer, Shift As Integer, x As Single, Y As Single)
- Dim clickcol As Integer
- curcol = Int(x)
- currow = FindRow(curcol)
- downrc = squareh
- timer1.Enabled = True
- inputdata curcol, currow
- End Sub
- Sub Timer1_Timer ()
- If downrc >= currow Then
- If color = red Then
- imgred.Move curcol, downrc
- Else
- imgblue.Move curcol, downrc
- End If
- downrc = downrc - 1
- imgred.ZOrder 1
- timer1.Enabled = False
- color = -1 * (color)
- End If
- End Sub
-